<%-- 
    Document   : adminPage
    Created on : 11 16, 10, 11:54:55 AM
    Author     : Erik Sy
--%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.Connection"%>
<%@page import="DBConnection.ConnectionFactory"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Administrator</title>

    <link rel = "stylesheet" href= "css/main.css" type="text/css"/>
        <link rel = "stylesheet" href= "css/menu.css" type="text/css"/>
    </head>
    <body>
        
        <%

        String username = (String)session.getAttribute("username");
        String userType = (String)session.getAttribute("userType");
        
        if((String)session.getAttribute("username")== null)
            {
            response.sendRedirect("adminIndex.jsp");
            }
        else if((String)session.getAttribute("userType")== "3")
            {
            response.sendRedirect("acctMgrHomePage.jsp");
            }
        else if((String)session.getAttribute("userType")== "2")
            {
            response.sendRedirect("prodMgrHomePage.jsp");
            }
        else if((String)session.getAttribute("userType")== "4")
            {
            response.sendRedirect("userHomePage.jsp");
            }
        else{
        
        out.print("Hello ");
        out.print(username);
        }
        %>
       
        
        
        <%--header--%>
        <div id="header">
           
        </div>
        <%--header--%>
        
        
        <%--menu--%>
        <div id="tabs24">   
             <ul>          
                <li><a href="addProdManager.jsp" >Create Product Mgr</a></li>
                <li><a href="addAcctManager.jsp" >Create Accounting Mgr</a></li>
                <li><a href="">View Accounts</a></li>
             </ul>   
        </div>
        <%--menu--%>
        
        <div class="wrapper">
        <%--centercontent--%>
        
        <div id="center">
           
           </div>
        </div>
       <%--centercontent--%>
        
        <div class="clear"></div>
       <%-- footer --%>
        <div id="footer">
             <a style=" margin-right: 20px; font-family: arial;float: right; color:white"href="LogoutServlet">Log Out</a>
        </div>
        <%-- footer --%>


    
    </body>
</html